package com.atguigu.gmall.web.feign;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.product.vo.SkuDetailVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("service-item")
@RequestMapping("/api/inner/rpc/item")
public interface ItemFeignClient {

    /**
     * feign远程调用service-item服务
     * @param skuId
     * @return
     */
    @GetMapping("sku/detail/{skuId}")
    public Result<SkuDetailVo> getSkuDetailVo(@PathVariable("skuId") Long skuId);
}
